#include <stdio.h>
#include <stdlib.h>

void help();
void hello();
void add();
void sub();

int main()
{
	char cmd[128]={0};
	while(1)
    {
		scanf("%s", cmd);
		if(strcmp(cmd, "help") == 0)
		{
			help();
		}
		else if(strcmp(cmd, "hello") == 0)
        {
            hello();
        }
		else if(strcmp(cmd, "date") == 0)
        {
            system(cmd);
        }
		else if(strcmp(cmd, "ls") == 0)
        {
            system(cmd);
        }
		else if(strcmp(cmd, "add") == 0)
        {
            add();
        }
		else if(strcmp(cmd, "sub") == 0)
        {
            sub();
        }
		else if(strcmp(cmd, "quit") == 0)
        {
            exit(0);
        }
        else
        {
			printf("Wrong menu\n");
        }
	}
}

void help()
{
    printf("help\tget help\n");
    printf("hello\tsay hello\n");
    printf("date\tshow date\n");
    printf("ls\tlist files\n");
    printf("add\taddition operation\n");
    printf("sub\tsubtraction operation\n");
    printf("exit\texit this progream\n");
}

void hello()
{
    printf("Hello\n");
}

void add()
{
    int a, b, add;
    printf("Please input to intergers: ");
    scanf("%d%d", &a, &b);
    add = a + b;
    printf("%d\n", add);
}


void sub()
{
    int a, b, add;
    printf("Please input to intergers: ");
    scanf("%d%d", &a, &b);
    add = a - b;
    printf("%d\n", add);
}
